package com.sample;

import java.nio.ByteBuffer;

import com.sample.jni.HelloService;
import com.sample.jni.NativeIOException;

public class JniApp {

	public static void main(String[] args) throws NativeIOException {

		/**
		 * 普通方法测试
		 */
		HelloService hello = new HelloService();
		System.out.println(hello.getStringFromC());

		/**
		 * 执行 mlock 
		 */
		ByteBuffer buffer = ByteBuffer.allocateDirect(1024);
		HelloService.mlock_native(buffer, 1024);
	}
}
